//


import UIKit

class WP_AboutViewController: WP_BasicViewController,UITableViewDelegate,UITableViewDataSource {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColorFromHex(0xFFFAF0)
        // Do any additional setup after loading the view.
        setNavTitle("About us")
        self.view.addSubview(pTableView)
    }
    
    lazy var pTableView:UITableView = {
        let tableview = UITableView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: kScreenHeight), style: .plain)
        tableview.delegate = self
        tableview.dataSource = self
        tableview.tableFooterView = UIView()
        tableview .register(UITableViewCell.classForCoder(), forCellReuseIdentifier:"cell")
        tableview.rowHeight = kRatioHeight(210)
        return tableview
        
    }()

    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 1
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell:UITableViewCell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
        cell.textLabel?.text = "Product introduction：\nIf you find it inconvenient to write weekly reports at regular meetings in your work, use workplan to write daily, weekly and monthly reports online, fill in and modify them anytime and anywhere, and the records will be convenient for later viewing. In a word, you can better summarize your work and find out the shortcomings, in a word, make reading more convenient and safer."
        cell.textLabel?.numberOfLines = 0
        cell.accessoryType = .none
        
        return cell
    }
    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
        return 100
    }
    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
        let view = UIView()
        let label1 = UILabel(frame: CGRect(x: 20, y: 10, width: kScreenWidth-20, height: 30))
        label1.text = "Contact phone number：+86 16510849973"
        view.addSubview(label1)
        //
        let label2 = UILabel(frame: CGRect(x: 20, y: 60, width: kScreenWidth-20, height: 30))
        label2.text = "Email：qhuc899@126.com"
        view.addSubview(label2)
        
        return view
    }
   
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
